<!DOCTYPE html>
<html lang="en">
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<title>登录</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- description -->
<meta name="description" content="Login Form - Responsive Template">
<link rel="shortcut icon" href="images/favicon.ico" th:href="@{/images/favicon.ico}">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="../../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}">
<!-- Material Design Icons CSS -->
<link rel="stylesheet" href="../../static/css/materialdesignicons.css" th:href="@{/css/materialdesignicons.css}">
<!-- Bootstrap Checkbox CSS -->
<link rel="stylesheet" href="../../static/css/awesome-bootstrap-checkbox.css" th:href="@{/css/awesome-bootstrap-checkbox.css}">
<!-- Rippler CSS -->
<link rel="stylesheet" href="../../static/css/rippler.min.css" th:href="@{/css/rippler.min.css}">
<!-- Style CSS -->
<link rel="stylesheet" href="../../static/css/style.css" th:href="@{/css/style.css}">
<!-- Responsive  CSS -->
<link rel="stylesheet" href="../../static/css/responsive.css" th:href="@{/css/responsive.css}">
</head>
<body>

<div class="container py-2">
    <div class="row">
        <div class="col-md-12">
			<div class="logo">
				<a href="#">
					<h1>宠物商店</h1>
				</a>
			</div>
            <div class="row">
                <div class="col-md-6 login-form mx-auto">
                    <!-- form card login -->
                    <div class="card">
                        <div class="card-header">
                            <h3 class="mb-0">登录</h3>
                        </div>
                        <div class="card-body">
                            <form id="formLogin" method="POST" class="formLogin" th:action="@{/admin/loginToIndex}">
                                <div class="form-group">
                                    <input for="username" class="form-control" id="username" name="username" placeholder="用户名" type="text" required="">
									<i class="fa fa-user"></i>
                                </div>
                                <div class="form-group">
                                    <input for="password" type="password" name="password" class="form-control" placeholder="密码" id="password" required="">
									<i class="fa fa-lock"></i>
                                </div>



								<div class="form-group">
									<input class="form-control" type="text" placeholder="验证码" name="check" id="check"/>
									<span style="cursor:pointer;float: right;height: 34px; width: 30%;">
                        			<img id="CreateCheckCode" style="width: 100%;height:100%;" 	th:src="@{/checkCode}" onclick="Reload()" />
                    				</span>
								</div>



								<div class="row mb-3">
									<div class="col-md-12">
										<div class="checkbox checkbox-primary">
											<input id="checkbox1" class="styled" type="checkbox">
											<label for="checkbox1">
												记住我
											</label>
										</div>
									</div>
									<div class="col-lg-12 text-left create-box text-block my-0">
										<a href="#" class="text-black text-small" style="color: dodgerblue">忘记密码?</a>
									</div>
								</div>
								<div style="color: red" th:if="${message != null}" th:text="${message}">用户名或者密码错误</div>
								<div class="row mb-3">
									<div class="col-lg-12 text-center"><button type="submit" class="btn btn-success hover-btn btn-wd " id="btnLogin"><span>登录</span></button></div>
								</div>
                            </form>

							<div class="naw-text mb-3">
								<h5>第一次使用</h5>
							</div>
<!--							<div class="row mb-3">-->
<!--								<div class="col-lg-6">-->
<!--									<a href="#" class="btn btn-primary btn-wd fb btn-block">-->
<!--										<span><i class="fa fa-facebook"></i> &nbsp;&nbsp;&nbsp;QQ登录</span>-->
<!--									</a>-->
<!--								</div>-->
<!--								<div class="col-lg-6">-->
<!--									<a href="#" class="btn btn-info btn-wd gp btn-block">-->
<!--										<span><i class="fa fa-google-plus"></i> &nbsp;&nbsp;&nbsp;Login Google</span>-->
<!--									</a>-->
<!--								</div>-->
							</div>
							<div class="row">
								<div class="col-lg-12">
									<div class="create-box text-block text-center my-0">
										<span class="text-small font-weight-semibold">还没有账号 ?</span>
										<a th:href="@{/register}" class="text-black text-small">注册一个新账号</a>
									</div>
								</div>
							</div>
                        </div>
                    </div>
                    <!-- /form card login -->
                </div>
            </div>
            <!--/row-->
        </div>
        <!--/col-->
    </div>
    <!--/row-->
</div>
<!--/container-->

<script>
	function Reload() {
		document.getElementById("CreateCheckCode").src =
				// 获取当前时间使其请求不重复
				document.getElementById("CreateCheckCode").src + "?nocache=" + new Date().getTime() + ".do";
	}
	$(function (){
		$('#username').blur(function (){
			$.
		})
	})

</script>

<!-- jquery latest version -->
<script src="../../static/js/jquery.min.js" th:href="@{/js/jquery.min.js}"></script>
<!-- popper.min.js -->
<script src="../../static/js/popper.min.js" th:href="@{/js/popper.min.js}"></script>
<!-- bootstrap js -->
<script src="../../static/js/bootstrap.min.js" th:href="@{/js/bootstrap.min.js}"></script>
<!-- Jquery Rippler js -->
<script src="../../static/js/jquery.rippler.min.js" th:href="@{/js/jquery.rippler.min.js}"></script>
<!-- script js -->
<script src="../../static/js/script.js" th:href="@{/js/script.js}"></script>
</body>
</html>